<!DOCTYPE html>
<html>
<head>
    <title>报废清单(新)</title>
    #parse("sys/header.html")
    <style>
        .sugon_upload_btn {
            display: -webkit-inline-box;
            display: inline-block;
        }
        ::-webkit-scrollbar{
            width: 10px;
            height: 10px;
        }
        ::-webkit-scrollbar-thumb{
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: #a8a5a5;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="3">
                    <i-input v-model="q.partName" @on-enter="query" placeholder="备件名称"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.spec" @on-enter="query" placeholder="备件规格"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.partCode" @on-enter="query" placeholder="备件编码"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.erpCode" @on-enter="query" placeholder="ERP编码"></i-input>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.producor" @on-enter="query" placeholder="供应厂商"></i-input>
                </i-col>
                <i-col span="2">
                    <i-select v-model="q.status" placeholder="审批状态">
                        <i-option v-for="item in statusList" :value="item.value" :key="item.value">{{item.name}}</i-option>
                    </i-select>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.createUserName" @on-enter="query" placeholder="录入人"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                <!--                #if($shiro.hasPermission("scarplist:imports"))-->
                <!--                <Upload ref="uploadFile"-->
                <!--                        action="../scarplist/import"-->
                <!--                        :format ="['xlsx','xls']"-->
                <!--                        :before-upload="handleBeforeUpload"-->
                <!--                        :on-success="handleSuccess" :on-error="handleError"-->
                <!--                        :on-format-error="handleFormatError" class="sugon_upload_btn">-->
                <!--                    <i-button type="error"><i class="fa fa-hand-o-down"></i>&nbsp;导入</i-button>-->
                <!--                </Upload>-->
                <!--                #end-->
                <!--                #if($shiro.hasPermission("scarplist:save"))-->
                <!--                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>-->
                <!--                #end-->
                <!--                #if($shiro.hasPermission("scarplist:update"))-->
                <!--                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>-->
                <!--                #end-->
                <!--#if($shiro.hasPermission("scarplist:check"))
                <i-button type="warning" @click="check"><i class="fa fa-check"></i>&nbsp;确认</i-button>
                #end-->
                #if($shiro.hasPermission("scarplist:approval"))
                <i-button type="primary" @click="approval"><i class="fa fa-gavel"></i>&nbsp;车间审核</i-button>
                #end
                #if($shiro.hasPermission("scarplist:PEapproval"))
                <i-button type="primary" @click="PEapproval"><i class="fa fa-gavel"></i>&nbsp;PE审核</i-button>
                #end
                <!--                #if($shiro.hasPermission("scarplist:delete"))-->
                <!--                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>-->
                <!--                #end-->
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>
    <div id="appv"  style="display: none;">
        <i-form :model="scarp" :label-width="90">
            <Form-item>
            </Form-item>
            <Form-item label="备件" prop="state" style="margin-bottom: 10px;">
                {{scarpName}}
            </Form-item>
            <Form-item label="处置方式" prop="state" style="margin-bottom: 10px;">
                <Radio-group v-model="scarp.state">
                    <Radio :label="1"><span>自主修复</span></Radio>
                    <Radio :label="2"><span>不可修复</span></Radio>
                </Radio-group>
            </Form-item>

            <Form-item label="备注信息" prop="checkRemark" style="margin-bottom: 10px;">
                <i-input type="textarea" v-model="scarp.checkRemark" placeholder="请输入备注信息" style="width: 350px;"></i-input>
            </Form-item>
            <Form-item>
                <span v-show="scarp.state === 1" style="font-size: 16px;color: red">
                    判定条为{{number}}可维修，需要完善{{number}}条维修记录
                </span>
            </Form-item>
        </i-form>
    </div>
    <!-- 审核列表区域 -->
    <div id="auditHistoryArea" style="display: none;">
        <i-table border :columns="auditTableColumns" :data="auditTableData"></i-table>
    </div>
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="scarpList" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="名称" prop="name">
                        <i-input v-model="scarpList.name" placeholder="备件名称" icon="md-arrow-dropdown-circle"  readonly @on-click="getSparePart" />
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="使用单位" prop="useUnit">
                        <i-input v-model="scarpList.useUnit" readonly placeholder="使用单位"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="所属设备" prop="subEquip">
                        <i-input v-model="scarpList.subEquip" placeholder="所属设备" icon="md-arrow-dropdown-circle"  readonly @on-click="getDeviceInfo"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="规格型号" prop="specs">
                        <i-input v-model="scarpList.specs" readonly placeholder="规格型号"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="生产线" prop="line">
                        <i-input v-model="scarpList.line" readonly placeholder="生产线"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="报废数量" prop="scarpNum">
                        <i-input v-model="scarpList.scarpNum" placeholder="报废数量"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="工序" prop="suggest">
                        <i-input v-model="scarpList.proceNo" readonly placeholder="工序"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="现象描述" prop="descript">
                        <i-input type="textarea" v-model="scarpList.descript" placeholder="现象描述"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="判定与建议" prop="suggest">
                        <i-input type="textarea"  v-model="scarpList.suggest" placeholder="判定与建议"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea"  v-model="scarpList.remark" placeholder="备注"/>
                    </Form-item>
                </i-col>
            </Row>
            <!-- <Row>
                 <i-col span="11">
                     <Form-item label="修改时间" prop="updateTime">
                         <i-input v-model="scarpList.updateTime" placeholder="修改时间"/>
                     </Form-item>
                 </i-col>
                 <i-col span="11">
                     <Form-item label="修改人" prop="updateUser">
                         <i-input v-model="scarpList.updateUser" placeholder="修改人"/>
                     </Form-item>
                 </i-col>
             </Row>
             <Row>
                 <i-col span="11">
                     <Form-item label="操作时间" prop="createTime">
                         <i-input v-model="scarpList.createTime" placeholder="操作时间"/>
                     </Form-item>
                 </i-col>
                 <i-col span="11">
                     <Form-item label="操作人姓名" prop="createUser">
                         <i-input v-model="scarpList.createUser" placeholder="操作人姓名"/>
                     </Form-item>
                 </i-col>
             </Row>
             <Row>
                 <i-col span="11">
                     <Form-item label="删除标识" prop="delFlag">
                         <i-input v-model="scarpList.delFlag" placeholder="删除标识"/>
                     </Form-item>
                 </i-col>
                 <i-col span="11">
                     <Form-item label="车间领导" prop="workshopLeader">
                         <i-input v-model="scarpList.workshopLeader" placeholder="车间领导"/>
                     </Form-item>
                 </i-col>
             </Row>
             <Row>
                 <i-col span="11">
                     <Form-item label="工厂设备技术室" prop="gcsbjs">
                         <i-input v-model="scarpList.gcsbjs" placeholder="工厂设备技术室"/>
                     </Form-item>
                 </i-col>
                 <i-col span="11">
                     <Form-item label="设备技术员" prop="equipTech">
                         <i-input v-model="scarpList.equipTech" placeholder="设备技术员"/>
                     </Form-item>
                 </i-col>
             </Row>
             <Row>
                 <i-col span="11">
                     <Form-item label="维修组长" prop="repairLeader">
                         <i-input v-model="scarpList.repairLeader" placeholder="维修组长"/>
                     </Form-item>
                 </i-col>-->



            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>

</div>

<script src="${rc.contextPath}/js/spare/scarplist.js?_${date.systemTime}"></script>
</body>
</html>
